public class TestDemo {
    public static boolean isNumOrCharacter(char ch) {
        if(ch >= '0' && ch <= '9' || ch >= 'a' && ch <= 'z') {
            return true;
        }
        return false;
    }
    public static boolean isPalindrome(String s)
    {
        s=s.toLowerCase();
        int i=0;
        int j=s.length()-1;
        while(i<=j)
        {
            if(isNumOrCharacter(s.charAt(i))&&isNumOrCharacter(s.charAt(j)))
            {if(s.charAt(i)==s.charAt(j))
            {
                i++;
                j--;
            }
            else
            {
                return false;
            }

            }
            else
            {
                while(i<j&&!isNumOrCharacter(s.charAt(i)))
                {
                    i++;
                }
                while(i<j&&!isNumOrCharacter(s.charAt(j)))
                {
                    j--;
                }
            }
        }
        return true;

    }
//    public static void main(String[]args){
//       char ch1='a';
//       char ch2='a';
//        System.out.println(ch1==ch2);
//    }
    public static void main1(String[]args)
    {

        String str="hello";
//        str=str+"abc";
//        System.out.println(str);
        StringBuilder stringBuilder=new StringBuilder();
        stringBuilder.append(str);
        stringBuilder.append("abc");
        str=stringBuilder.toString();
        System.out.println(str);
    }
}
